#ifndef PIECEGENERATORMODEL_H_
#define PIECEGENERATORMODEL_H_

#include "Model.h"
#include "PieceModel.h"
#include "Position.h"
#include "Players.h"

class PieceGeneratorModel : public Model
{
public:
    PieceGeneratorModel(PlayersPtr players, unsigned int widthOfWell);
    virtual ~PieceGeneratorModel();

    PieceModel* getNextPieceFor(int playerId);

private:
    PieceModel* createRandomPiece(const Position& position);
    void fillNextPieces();

    PieceModelsMap nextPieces;
    PlayersPtr players;
    unsigned int widthOfWell;

};

#endif
